import request from '@/utils/request'
export function page(params) {
  return request({
    url: '/device/page',
    method: 'get',
    params
  })
}

export function findById(id) {
  return request({
    url: '/device/'+id,
    method: 'get',
  })
}
export function save(data) {
  return request({
    url: '/device',
    method: 'put',
    data
  })
}
export function saveAndEdit(data) {
  return request({
    url: '/device/saveAndEdit',
    method: 'post',
    data
  })
}
export function deleteById(id) {
  return request({
    url: '/device/'+id,
    method: 'delete',
  })
}


